Add support for new '\_<' and '\_>' regexp operators, matching the
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 19 May 2004 16:37:35 +0000 (16:37 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 19 May 2004 16:37:35 +0000 (16:37 +0000)
commit488011c3bb04cc9fb6c6e87b8242765b18dea7e9
treeab8784d25a01db531f678b0ea2e170d6cd879e81
parent2bc5ecd06cb2edfe89fe9a55c5e2834112a99cba
Add support for new '\_<' and '\_>' regexp operators, matching the
beginning and ends of symbols.
* regex.c (enum syntaxcode): Add Ssymbol.
(init_syntax_once): Set the syntax for '_' to Ssymbol, not Sword.
(re_opcode_t): New opcodes `symbeg' and `symend'.
(print_partial_compiled_pattern): Print the new opcodes properly.
(regex_compile): Parse the new operators.
(analyse_first): Skip symbeg and symend (they match only the empty string).
(mutually_exclusive_p): `symend' is mutually exclusive with \s_ and
\sw; `symbeg' is mutually exclusive with \S_ and \Sw.
(re_match_2_internal): Match symbeg and symend.
src/regex.c